﻿/**
 * Scene
 * 
 * @version 2012.01.27
 * @author  Bruno Miguel de Oliveira Tamer <bmotamer@gmail.com>
 */

namespace main.sdk.scene
{

    public static class Scene
    {

        #region Static Variables

        private static Scene_Base _Current;

        public static Scene_Base Current
        {
            get { return _Current; }
            set { Set(value); }
        }

        #endregion

        #region Static Methods

        public static void Set(Scene_Base newScene)
        {
            if (_Current != null)
                _Current.Terminate();
            _Current = newScene;
            if (_Current != null)
                _Current.Start();
        }

        public static bool Update()
        {
            if (_Current == null)
                return true;
            _Current.Update();
            return false;
        }

        #endregion

    }

}